<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象优化</title>
</head>
<body>

    <script>
        const person = {
            name:"zhangsan",
            age:32,
            "sex":"男",
            eat:function(){
                console.log("吃")
            }
        }
        console.log(Object.keys(person))
        console.log(Object.values(person))
        console.log(Object.entries(person))


        const a = {a:"1"}
        const bb = {bb:3}

        var target = {aaaa:"2333"}
        Object.assign(target,a,bb)
        console.log(target)

        
        person.eat();
    </script>
</body>
</html>